<?php
namespace application\modules\user_guide\controllers;

use system\core\Controller;

class Tutorial extends Controller
{

    public function basic( $page = 'index' ) 
    {        
        if ( ! file_exists(APP_PATH . 'modules/user_guide/views/tutorial/basic/' . $page . '.phtml') )
        {
            throw new \Exception('This page could not be found!', 404);
        }
        
        $this->template->disable();
        
        $this->template->write('title', 'Tutorial (basic)');
        $this->template->writeView('content', 'tutorial/basic/' . $page);
        $this->template->render();
    }
    
    public function advanced( $page = NULL )
    {
        if ( ! $page )
        {
            $page = 'index';
        }
        
        $this->template->disable();
        
        $this->template->write('title', 'Tutorial (advanced)');
        $this->template->writeView('content', 'tutorial/advanced/' . $page);
        $this->template->render();
    }

}

/* End of file Tutorial.php */